<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
</body>
<script src="./node_modules/axios/dist/axios.js"></script>
<script type="module">
    import axios from "./index.js";
    const req1 = axios.interceptors.request.use(config=>{
        console.log("请求拦截成功1");
        return config;
    },(err)=>{
        console.log("请求拦截失败1");
        return err;
    })
    const req2 = axios.interceptors.request.use(config=>{
        console.log("请求拦截成功2");
        return config;
    },(err)=>{
        console.log("请求拦截失败2");
        return err;
    })

    const res1 = axios.interceptors.response.use(res=>{
        console.log("响应拦截成功1");
        return res;
    },(err)=>{
        console.log("响应拦截成功1");
        return err;
    })
    const res2 =  axios.interceptors.response.use(res=>{
        console.log("响应拦截成功2");
        return res;
    },(err)=>{
        console.log("响应拦截成功2");
        return err;
    })
    console.log(req1,req2,res1,res2);
    // axios.interceptors.request.eject(req1);
    // axios.interceptors.request.eject(req2);
    // axios.interceptors.response.eject(res1);
    // axios.interceptors.response.eject(res2);
    axios.interceptors.request.clear();
    axios.interceptors.response.clear();

    axios.get("http://zhangpeiyue.com/scoreList",{
        params: {
            sex: "男"
        }
    }).then(value=>{
        console.log(value.data);
    })

</script>
</html>